package com.xoa.controller.party;


import com.xoa.model.party.EsDisplay;
import com.xoa.service.party.EsDisplayService;
import com.xoa.util.ToJson;
import com.xoa.util.common.newwrapper.BaseWrapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 电子显示屏
 * Created by gsb on 2018/1/11.
 */
@Controller
@RequestMapping("/esDisplay")
public class EsDisplayController {

    @Resource
    private EsDisplayService esDisplayService;

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-11 下午15:21:51
     * 类介绍  :   新建
     * 构造参数:
     *
     */
    @RequestMapping(value ="insertSelective")
    @ResponseBody
    public ToJson<EsDisplay> insertSelective(EsDisplay esDisplay, HttpServletRequest request, String gridLocation){
        return esDisplayService.insertSelective(esDisplay, request,gridLocation);
    }

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-11 下午15:21:51
     * 类介绍  :   删除
     * 构造参数:
     *
     */
    @RequestMapping(value ="deleteByPrimaryKey")
    @ResponseBody
    public ToJson<EsDisplay> deleteByPrimaryKey(Integer eid){
        return esDisplayService.deleteByPrimaryKey(eid);
    }
    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-11 下午15:21:51
     * 类介绍  :   修改
     * 构造参数:
     *
     */
    @RequestMapping(value ="updateByPrimaryKeySelective")
    @ResponseBody
    public ToJson<EsDisplay> updateByPrimaryKeySelective(EsDisplay esDisplay, String gridLocation){
        return  esDisplayService.updateByPrimaryKeySelective(esDisplay,gridLocation);
    }
    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-11 下午15:21:51
     * 类介绍  :   详情
     * 构造参数:
     *
     */
    @RequestMapping(value ="selectById")
    @ResponseBody
    public ToJson<EsDisplay> selectById(Integer eid){
        return esDisplayService.selectById(eid);
    }

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-11 下午15:21:51
     * 类介绍  :   列表
     * 构造参数:
     *
     */
    @RequestMapping(value ="queryList")
    @ResponseBody
    public ToJson<EsDisplay> queryList(EsDisplay esDisplay, Integer page, Integer pageSize,
                                       boolean useFlag, HttpServletRequest request, HttpServletResponse response, String export){
        return esDisplayService.queryList(esDisplay, page, pageSize, useFlag, request, response, export);
    }

    @RequestMapping("/outPutFile")
    @ResponseBody
    public BaseWrapper outPutFile(HttpServletRequest request, HttpServletResponse response){
        return esDisplayService.outPutFile(request,response);
    }
}
